﻿"use strict";

var appGlobalVars = (function () {

    //private variables
    /* Global Application Variables */
    var _isFirstTime,
        _isDeviceRegisteredLocally,
        _isDeviceRegisteredOnServer,
        _appDBBuild = "0.1",
        _appBuild = "0.1",//"0.1p",
        _tbl_UCred = "tbl_UCred",
        _tbl_UContacts = "tbl_UContacts",
        _tbl_UContactInfos = "tbl_UContactInfos",
        _tbl_UReminders = "tbl_UReminders",
        _tbl_UContactCategories = "tbl_UContactCategories",
        _isProduction = false;

    return {

        /*****************************************************************/
        //table_UserCred
        //:returns name of the credential table
        /*****************************************************************/
        isProduction: function () {
            return _isProduction;
        },

        /*****************************************************************/
        //table_UserCred
        //:returns name of the credential table
        /*****************************************************************/
        appDBBuild: function () {
            return _appDBBuild;
        },

        /*****************************************************************/
        //table_UserCred
        //:returns name of the credential table
        /*****************************************************************/
        table_UserCred: function () {
            return _tbl_UCred;
        },

        /*****************************************************************/
        //table_Contacts
        //:returns name of the contact table
        /*****************************************************************/
        table_Contacts: function () {
            return _tbl_UContacts;
        },
        
        /*****************************************************************/
        //table_ContactInfos
        //:returns name of the contact details table
        /*****************************************************************/
        table_ContactInfos: function () {
            return _tbl_UContactInfos;
        },

        /*****************************************************************/
        //table_Reminders
        //:hols the list of reminders
        /*****************************************************************/
        table_Reminders: function () {
            return _tbl_UReminders;
        },

        /*****************************************************************/
        //table_ContactCategories
        //:returns list of Contact Categories
        /*****************************************************************/
        table_ContactCategories: function () {
            return _tbl_UContactCategories;
        },


        /*****************************************************************/
        //table_UserCred
        //:returns name of the credential table
        /*****************************************************************/
        appBuild: function () {
            return _appBuild;
        },

        /*****************************************************************/
        //IsProVersion
        //:determines whether the application is on Pro or Free mode
        //:Todo:come up with a more secure theme here....
        /*****************************************************************/
        isProVersion: function () {
            return (_appBuild.substr(_appBuild.length - 1, 1) == "p");
        },

        /*****************************************************************/
        //Set_IsFirstTime
        //:sets whether the application is being ran for the first time
        /*****************************************************************/
        set_IsFirstTime: function (val) {
            //alert('inside global.set_IsFirstTime and val is:' + val);
            _isFirstTime = val
        },

        /*****************************************************************/
        //IsFirstTime
        //:whether the application is being ran for the first time
        /*****************************************************************/
        isFirstTime: function () {
            return _isFirstTime
        }
     
    };
}());

